package com.nbsaas.boot.no.rest.generator;


import com.nbsaas.boot.no.ext.apis.Generator;

// 组合生成器
public class CompositeGenerator implements Generator {
    private Generator[] generators;

    public CompositeGenerator(Generator... generators) {
        this.generators = generators;
    }

    @Override
    public String generate() {
        StringBuilder result = new StringBuilder();
        for (Generator generator : generators) {
            result.append(generator.generate());
        }
        return result.toString();
    }
}
